package com.moyq5.mvc.maker.test.bean.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.GenericGenerator;

/**
 * 商户定制页面
 * @author Moyq5
 * @date 2018年7月5日
 */
@Entity
@Table(name = "uc_merch_diy")
@DynamicUpdate
public class MerchDiy implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	/**
	 * DIY ID
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "native")@GenericGenerator(name = "native", strategy = "native")
    @Column(name = "diy_id")
	private Long diyId;
	/**
	 * 商家
	 */
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "merch_id")
	private Merch merch;
	/**
	 * 内容，url等
	 */
	@Column(name = "content", nullable = false, length = 300)
	private String content;
	public Long getDiyId() {
		return diyId;
	}
	public void setDiyId(Long diyId) {
		this.diyId = diyId;
	}
	public Merch getMerch() {
		return merch;
	}
	public void setMerch(Merch merch) {
		this.merch = merch;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	
}
